import os
import sqlite3

db_name = os.path.expanduser(os.path.join("~","db","plugins.db"))
conn = sqlite3.connect(db_name)
c = conn.cursor()
c.executescript("""
DROP TABLE IF EXISTS PLUGINS;

CREATE TABLE PLUGINS (
NAME TEXT,
PARENT TEXT,
INSTALL_DATE TEXT,
AUTO_START INTEGER,
RUN_ONCE INTEGER,
RUN_COUNT INTEGER,
SEQUENCE INTEGER,
STATE TEXT,
PRIMARY KEY(NAME,PARENT)
);

""")

conn.commit()
conn.close()
